home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2144 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. Path: usenet.eel.ufl.edu!pacifier!usenet
  2. From: dgager@pacifier.com (Dave Gager)
  3. Newsgroups: comp.lang.c++
  4. Subject: Quick and Dirty Date Function
  5. Date: 16 Jan 1996 04:52:10 GMT
  6. Organization: Pacifier Internet Server (360) 693-0325
  7. Message-ID: <4dfatq$fec@news.pacifier.com>
  8. Reply-To: dgager@pacifier.com
  9. NNTP-Posting-Host: ip61.van2.pacifier.com
  10. Mime-Version: 1.0
  11. X-Newsreader: WinVN 0.99.2
  12.  
  13.  Does anybody know of, or have, a quick & dirty function that takes two 
  14. dates and returns the EXACT number of days between them (inclusive). 
  15. Preferrably, it should not need any maintenence after the year 2000, 
  16. (i.e. using a "yy -= 1900" should not be an option as this will create 
  17. the illusion of the year 2001 occuring BEFORE  1999! This would be not 
  18. good.) I thought I would see if someone else did the legwork before 
  19. attempting the "if (month = 31 || month = 30) " or if(leapyear) etc.
  20. Call me lazy......    ;-)
  21.    E-Mail dgager@pacifier.com with any help.   TIA!
  22.                                                 -Dave  
  23. -- 
  24. -------------------------------------------------------------------------
  25. -----
  26. Pacifier Online Data Service Dialup SLIP/PPP User
  27. To register: (360) 693-0325 or telnet pods.pacifier.com
  28. -------------------------------------------------------------------------
  29. -----
  30.  
  31.